package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/11/08 08:36
 **/
public class Day65_1_Num1684_CountConsistentStrings {
    class Solution {
        public int countConsistentStrings(String allowed, String[] words) {
            for(int i = 0; i < words.length; ++i){
                for(int j = 0; j < allowed.length(); ++j)
                    words[i] = words[i].replace(allowed.charAt(j)+"", "");
            }
            int ans = 0;
            for(String s : words) {
                if(s.length() == 0) ans++;
            }
            return ans;
        }
    }
}